package montaltoTests
import montaltoFood._
import org.scalatest.Spec
import org.scalatest.matchers.ShouldMatchers


class FoodSpec extends Spec with ShouldMatchers {
  val foodFactory = new FoodFlyWeightFactory()
  describe("Fly weight factory") {
    describe("(make some meat)") {
      it("calories should be 3") {
        foodFactory.getFood("meat").getCalories should be (3)
      }
    }
    describe(" make some mullet"){
       it("calories should be 1") {
        foodFactory.getFood("mullet").getCalories should be (1)
      }
    }
    describe(" make some grain"){
       it("calories should be 2") {
        foodFactory.getFood("grain").getCalories should be (2)
      }
      
    }
    describe("random food generator"){
      val f:Food = RandomFood.get()
      it("should be greater than -1 "){
         f.getCalories > -1 should be (true)
      }
    }
  }
}
